package com.ruoyi.user.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 零钱流水对象 wallet_transaction_log
 * 
 * @author ruoyi
 * @date 2025-10-21
 */
public class WalletTransactionLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 流水ID */
    @Excel(name = "流水ID")
    private String txnId;

    /** 钱包ID */
    @Excel(name = "钱包ID")
    private String walletId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private String customerId;

    /** 订单ID */
    @Excel(name = "订单ID")
    private String orderId;

    /** 类型 */
    @Excel(name = "类型")
    private Long type;

    /** 变动金额 */
    @Excel(name = "变动金额")
    private BigDecimal amount;

    /** 变动后余额 */
    @Excel(name = "变动后余额")
    private BigDecimal balanceAfter;

    /** 渠道 */
    @Excel(name = "渠道")
    private Long channel;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deletedAt;

    /** 预留字段1 */
    @Excel(name = "预留字段1")
    private String externField1;

    /** 预留字段2 */
    @Excel(name = "预留字段2")
    private String externField2;

    public void setTxnId(String txnId) 
    {
        this.txnId = txnId;
    }

    public String getTxnId() 
    {
        return txnId;
    }

    public void setWalletId(String walletId) 
    {
        this.walletId = walletId;
    }

    public String getWalletId() 
    {
        return walletId;
    }

    public void setCustomerId(String customerId) 
    {
        this.customerId = customerId;
    }

    public String getCustomerId() 
    {
        return customerId;
    }

    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }

    public void setType(Long type) 
    {
        this.type = type;
    }

    public Long getType() 
    {
        return type;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setBalanceAfter(BigDecimal balanceAfter) 
    {
        this.balanceAfter = balanceAfter;
    }

    public BigDecimal getBalanceAfter() 
    {
        return balanceAfter;
    }

    public void setChannel(Long channel) 
    {
        this.channel = channel;
    }

    public Long getChannel() 
    {
        return channel;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setDeletedAt(Date deletedAt) 
    {
        this.deletedAt = deletedAt;
    }

    public Date getDeletedAt() 
    {
        return deletedAt;
    }

    public void setExternField1(String externField1) 
    {
        this.externField1 = externField1;
    }

    public String getExternField1() 
    {
        return externField1;
    }

    public void setExternField2(String externField2) 
    {
        this.externField2 = externField2;
    }

    public String getExternField2() 
    {
        return externField2;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("txnId", getTxnId())
            .append("walletId", getWalletId())
            .append("customerId", getCustomerId())
            .append("orderId", getOrderId())
            .append("type", getType())
            .append("amount", getAmount())
            .append("balanceAfter", getBalanceAfter())
            .append("channel", getChannel())
            .append("status", getStatus())
            .append("remark", getRemark())
            .append("createdAt", getCreatedAt())
            .append("deletedAt", getDeletedAt())
            .append("externField1", getExternField1())
            .append("externField2", getExternField2())
            .toString();
    }
}
